Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

deMesh_priv.hpp

Go to the documentation of this file.
00001 ///////////////////////////////////////////////////////////////////////////////
00002 /// @file deMesh.hpp
00003 ///
00004 /// @brief mesh class interface
00005 ///
00006 /// @author Assassin
00007 ///
00008 /// This file is the intellectual property of Novus Delta, LLC.. Usage of the
00009 /// contents of this file is subject to the Destiny3D Member License which
00010 /// can be found at http://www.destiny3d.com.  Any other usage is prohibited.
00011 ///
00012 /// This file is distributed "AS IS" without warranty of any kind.  Novus
00013 /// Delta, LLC. does not guarantee the fitness of the contents of this file
00014 /// for any particular purpose.
00015 ///
00016 /// Copyright (C) 2001-2003 Novus Delta, LLC. All Rights Reserved.
00017 ///
00018 /// <hr>
00019 ///                                 Change History
00020 /// <hr>
00021 ///
00022 /// @date Aug 2003
00023 /// @author Assassin
00024 /// @remarks Creation
00025 ///
00026 ///////////////////////////////////////////////////////////////////////////////
00027 #ifndef DEMESH_PRIV_HPP
00028 #define DEMESH_PRIV_HPP
00029 
00030 #include "deMesh.hpp"
00031 #include "deWorld_Helper.hpp"
00032 #include "deArray.hpp"
00033 
00034 extern "C" deBoolean IdeMesh_Initialize();
00035 
00036 class deMesh : public deWorldObject, virtual public IdeMesh
00037 {
00038 protected:
00039     ~deMesh();
00040 public:
00041     deMesh();
00042     
00043     WorldObjectClassDef;
00044     void* GetWOInterface(long interface_id);
00045     deBoolean DeSerializeLoad();
00046 
00047     deBoolean BuildFromBrushGeometry(IdeBrush* brush);
00048     deBoolean BuildFromVertices();
00049     void ClearGeometry();
00050     
00051     deBoolean AddVertices(const deMeshVertexData & vertexdata, long & indexoffset);
00052     deBoolean AddIndices(const deMeshIndexData & indexdata);
00053     
00054     void SetNumSubMeshes(u32 NumSubs, deBoolean Dynamic);
00055     deBoolean SetSurface(u32 SubNum, IdeSurface* Surface);
00056     IdeSurface* GetSurface(u32 SubNum);
00057     deBoolean SetNumFaces(u32 SubNum, u32 NumFaces);
00058     u32 GetNumFaces(u32 SubNum);
00059     deBoolean Lock(deVertex** &positions, deTexCoord2** &uvcoords, deARGB** &colors);
00060     deBoolean Unlock(deVertex** &positions, deTexCoord2** &uvcoords, deARGB** &colors);
00061 
00062     IdeVertexBuffer* GetMainVertexBuffer();
00063     long GetNumSubMeshes();
00064     IdeVertexBuffer* GetSubMeshVertexBuffer(long index);
00065     IdeVertexBuffer* GetSubMeshIndexBuffer(long index);
00066     IdeSurface* GetSubMeshSurface(long index);
00067 
00068     deDouble GetBoundRadius();
00069     void GetBBox(deAABB& outBox);
00070     
00071 private:
00072     struct deSubMesh
00073     {
00074         IdeVertexBuffer*    IBuffer;
00075         IdeVertexBuffer*    VBuffer;
00076         IdeSurface*         Surface;
00077     };
00078     IdeVertexBuffer* m_MainVertexBuffer;
00079     IdeVertexBuffer* m_MainIndexBuffer;
00080     deTArray <deSubMesh>    m_SubMeshes;
00081     deTArray <deMeshVertexData> m_VertexDataList;
00082     deTArray <deMeshIndexData>  m_IndexDataList;
00083     struct SubMeshDescriptor
00084     {
00085         deWorldID WorldID;
00086         deObjectID ObjectID;
00087     };
00088     deTArray <SubMeshDescriptor>    m_TempSubMeshes;
00089     deDouble m_BoundRadius;
00090     deAABB m_BBox;
00091 };
00092 
00093 
00094 #endif

Generated on Mon Sep 12 19:58:31 2005 for Destiny3D by doxygen1.3-rc3